package com.cskaoyan.controller;


import com.cskaoyan.bean.baseresultVO.BaseData;
import com.cskaoyan.bean.baseresultVO.BaseRespVo;
import com.cskaoyan.bean.domain.Region;
import com.cskaoyan.service.RegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 行政区域表 前端控制器
 * </p>
 *
 * @author looper
 * @since 2021-11-29
 */
@RestController
@RequestMapping("admin/region")
public class RegionController {

    @Autowired
    RegionService service;

    @GetMapping("list")
    public BaseRespVo<Region> getRegionList() {

        BaseData baseData = service.getRegionList();

        return BaseRespVo.ok(baseData);

    }

}

